var e = getApp(), c = require("../../utils/util.js");

Page({
    data: {
        objectArray: e.globalData.city,
        province: [],
        city: [],
        check0: !1,
        check1: !1,
        check2: !1,
        check3: !1,
        checkvalue0: "出生日期",
        checkvalue1: "出生日期",
        checkvalue2: "出生时间",
        checkvalue3: 0,
        checkvalue4: 0,
        showModalStatus: !1,
        current: 0
    },
    onLoad: function(c) {
        var t = this;
        e.init_city(t);
    },
    provinceChose: function(c) {
        var t = this;
        e.provinceChose(t, c);
    },
    bindPickerChange: function(c) {
        var t = this;
        e.bindPickerChange(t, c);
    },
    jumptoDetail: function(t) {
        var a, n, o, i, r, h, u = this, l = u.data;
        t.currentTarget.dataset.type > 0 ? (a = l.check1 && l.check2 && l.check3, o = l.checkvalue1, 
        i = l.checkvalue2, r = l.province[l.checkvalue4], h = l.city[l.checkvalue3], n = o.replace(/-/g, "_") + "_" + i.replace(/:/g, "_") + "_0_" + r + "_" + h) : (a = l.check0, 
        n = (o = l.checkvalue0.split("-"))[1] + "_" + o[2]), console.log(n);
        var s = c.authcode("0_" + n, "encode");
        console.log("编码", s);
        var v = "astrocx_info?q=" + s;
        a ? wx.navigateTo({
            url: v
        }) : e.showModal(u);
    },
    onShareAppMessage: function(e) {
        return "button" === e.from && console.log(e.target), {
            title: "星座查询",
            path: "/pages/astrocx/index",
            success: function(e) {},
            fail: function(e) {}
        };
    },
    changeCXtype: function() {
        var e = !this.data.current;
        this.setData({
            current: e
        });
    }
});